// generic class for vector implementation of stack

#ifndef STACK
#define STACK

#include <vector>

template<class T, int capacity = 30>
class stack
{
    public:
        stack() { 
            pool.reserve(capacity); 
        }
        void clear() {
            pool.clear(); 
        }
        bool isEmpty() const { 
            return pool.empty(); 
        }
        T& topEL() {
            return pool.back();
        }
        T pop() {
            T el = pool.back();
            pool.pop_back();
            return el;
        }
        void push (const T& el) {
            pool.push_back(el);
        }
    private:
        Vector<T> pool;
};

#endif